<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Data Structures for Sets and Graphs: Hash&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Data Structures for Sets and Graphs
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">Hash&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>An interface to packed perfect hashing with cmph.  
 <a href="classHash.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Hash_8h_source.html">Hash.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Hash&lt; T &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classHash__coll__graph.png" border="0" usemap="#Hash_3_01T_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="Hash_3_01T_01_4_coll__map" id="Hash_3_01T_01_4_coll__map">
<area shape="rect" id="node7" href="classHash_1_1BinSearch.html" title="An implementation of Search using binary search in an ordered table." alt="" coords="88,277,240,307"/><area shape="rect" id="node2" href="classHash_1_1CMPHSearch.html" title="An implementation of Search the cmph package." alt="" coords="35,85,208,115"/><area shape="rect" id="node4" href="classHash_1_1Search.html" title="An interface to the search object." alt="" coords="55,5,188,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classHash-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash_1_1BinSearch.html">BinSearch</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An implementation of <a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> using binary search in an ordered table.  <a href="classHash_1_1BinSearch.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash_1_1CMPHSearch.html">CMPHSearch</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An implementation of <a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> the cmph package.  <a href="classHash_1_1CMPHSearch.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash_1_1Search.html">Search</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An interface to the search object.  <a href="classHash_1_1Search.html#details">More...</a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2e7e282b9f830b27004d3a3f596a0e64"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a2e7e282b9f830b27004d3a3f596a0e64">Hash</a> (size_t <a class="el" href="classHash.html#afe49a7ea85fe8259dc751c451ebc0906">key_offset</a>, size_t <a class="el" href="classHash.html#a035d8296ce745c37829cb286e7c905c6">key_len</a>, int(*<a class="el" href="classHash.html#a041ae966f44c256333f68fef549a053b">compar</a>)(const void *, const void *))</td></tr>
<tr class="memdesc:a2e7e282b9f830b27004d3a3f596a0e64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an empty parfect hash table.  <a href="#a2e7e282b9f830b27004d3a3f596a0e64"></a><br/></td></tr>
<tr class="memitem:a3690930041a748071efe477824491650"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a3690930041a748071efe477824491650">~Hash</a> ()</td></tr>
<tr class="memitem:a1ef2beb4c2383079120b33866f535091"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a1ef2beb4c2383079120b33866f535091">renew</a> (T *key, size_t nk)</td></tr>
<tr class="memdesc:a1ef2beb4c2383079120b33866f535091"><td class="mdescLeft">&#160;</td><td class="mdescRight">Renews this perfect hash table with the specified keys.  <a href="#a1ef2beb4c2383079120b33866f535091"></a><br/></td></tr>
<tr class="memitem:a72564107e3d223d1388c64c86e8d6072"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a72564107e3d223d1388c64c86e8d6072">search</a> (const T *key)</td></tr>
<tr class="memdesc:a72564107e3d223d1388c64c86e8d6072"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the index of the specified element in this perfect hash table.  <a href="#a72564107e3d223d1388c64c86e8d6072"></a><br/></td></tr>
<tr class="memitem:a44dfebdb7d2c909bf3e7e7f4ee65554e"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a44dfebdb7d2c909bf3e7e7f4ee65554e">size</a> ()</td></tr>
<tr class="memdesc:a44dfebdb7d2c909bf3e7e7f4ee65554e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of elements currently in this parfect hash table.  <a href="#a44dfebdb7d2c909bf3e7e7f4ee65554e"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:afe49a7ea85fe8259dc751c451ebc0906"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#afe49a7ea85fe8259dc751c451ebc0906">key_offset</a></td></tr>
<tr class="memdesc:afe49a7ea85fe8259dc751c451ebc0906"><td class="mdescLeft">&#160;</td><td class="mdescRight">in the struct T  <a href="#afe49a7ea85fe8259dc751c451ebc0906"></a><br/></td></tr>
<tr class="memitem:a035d8296ce745c37829cb286e7c905c6"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a035d8296ce745c37829cb286e7c905c6">key_len</a></td></tr>
<tr class="memdesc:a035d8296ce745c37829cb286e7c905c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">in bytes  <a href="#a035d8296ce745c37829cb286e7c905c6"></a><br/></td></tr>
<tr class="memitem:a1f38ab7c36ba7e5c1a00c27185cdc381"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a1f38ab7c36ba7e5c1a00c27185cdc381">hashtab</a></td></tr>
<tr class="memdesc:a1f38ab7c36ba7e5c1a00c27185cdc381"><td class="mdescLeft">&#160;</td><td class="mdescRight">packed table  <a href="#a1f38ab7c36ba7e5c1a00c27185cdc381"></a><br/></td></tr>
<tr class="memitem:a5225bd53a5a66ccd0255d4d1366be69e"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a5225bd53a5a66ccd0255d4d1366be69e">nelem</a></td></tr>
<tr class="memdesc:a5225bd53a5a66ccd0255d4d1366be69e"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of elements in the table  <a href="#a5225bd53a5a66ccd0255d4d1366be69e"></a><br/></td></tr>
<tr class="memitem:a84b77b59bd8e66fc9502bfdacf4afa4e"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a84b77b59bd8e66fc9502bfdacf4afa4e">packed_size</a></td></tr>
<tr class="memdesc:a84b77b59bd8e66fc9502bfdacf4afa4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">size of the packed table  <a href="#a84b77b59bd8e66fc9502bfdacf4afa4e"></a><br/></td></tr>
<tr class="memitem:a041ae966f44c256333f68fef549a053b"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#a041ae966f44c256333f68fef549a053b">compar</a> )(const void *, const void *)</td></tr>
<tr class="memdesc:a041ae966f44c256333f68fef549a053b"><td class="mdescLeft">&#160;</td><td class="mdescRight">it is expected to have two arguments which point to a key object and to an array member's key, in that order, and should return an integer less than, equal to, or greater than zero if the key object is found, respectively, to be less than, to match, or be greater than the array member.  <a href="#a041ae966f44c256333f68fef549a053b"></a><br/></td></tr>
<tr class="memitem:aa72bab5659a7bfedf7a7e33074b89103"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classHash_1_1Search.html">Search</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#aa72bab5659a7bfedf7a7e33074b89103">s</a></td></tr>
<tr class="memdesc:aa72bab5659a7bfedf7a7e33074b89103"><td class="mdescLeft">&#160;</td><td class="mdescRight">current object <a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> object  <a href="#aa72bab5659a7bfedf7a7e33074b89103"></a><br/></td></tr>
<tr class="memitem:ae90bc6965f9447ad87736c77d6f43410"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classHash_1_1CMPHSearch.html">CMPHSearch</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#ae90bc6965f9447ad87736c77d6f43410">cmphs</a></td></tr>
<tr class="memdesc:ae90bc6965f9447ad87736c77d6f43410"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> object to search in the cmph table.  <a href="#ae90bc6965f9447ad87736c77d6f43410"></a><br/></td></tr>
<tr class="memitem:ab9622513f2e957b9db790c4032ccbfb4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classHash_1_1BinSearch.html">BinSearch</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#ab9622513f2e957b9db790c4032ccbfb4">bins</a></td></tr>
<tr class="memdesc:ab9622513f2e957b9db790c4032ccbfb4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> object to search in an ordered table.  <a href="#ab9622513f2e957b9db790c4032ccbfb4"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aea88561fddd2e924cebf793f0cfdc8b6"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHash.html#aea88561fddd2e924cebf793f0cfdc8b6">Search</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br/>
class Hash&lt; T &gt;</h3>

<p>An interface to packed perfect hashing with cmph. </p>
<p>This table uses perfect hashing for constant time access only if the number of elements is greater than 7. Otherwise, binary search in an ordered table is performed.</p>
<dl class="tparams"><dt>Template Parameters:</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>the struct of the elements in this parfect hash table </td></tr>
  </table>
  </dd>
</dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2e7e282b9f830b27004d3a3f596a0e64"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classHash.html">Hash</a>&lt; T &gt;::<a class="el" href="classHash.html">Hash</a> </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(const void *, const void *)&#160;</td>
          <td class="paramname"><em>compar</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an empty parfect hash table. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">key_offset</td><td>to be used in each invocation to <code>cmph_io_struct_vector_adapter</code> </td></tr>
    <tr><td class="paramname">key_len</td><td>to be used in each invocation to <code>cmph_io_struct_vector_adapter</code> </td></tr>
    <tr><td class="paramname">compar</td><td>comparison function, which is expected to have two arguments which point to a key object and to an array member's key, in that order, and should return an integer less than, equal to, or greater than zero if the key object is found, respectively, to be less than, to match, or be greater than the array member. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3690930041a748071efe477824491650"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classHash.html">Hash</a>&lt; T &gt;::~<a class="el" href="classHash.html">Hash</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1ef2beb4c2383079120b33866f535091"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::renew </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Renews this perfect hash table with the specified keys. </p>
<p>If this perfect hash table is not empty, then the old table is free'd.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>the table of keys </td></tr>
    <tr><td class="paramname">nk</td><td>number of keys in the specified table </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a72564107e3d223d1388c64c86e8d6072"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::search </td>
          <td>(</td>
          <td class="paramtype">const T *&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the index of the specified element in this perfect hash table. </p>
<p>The key's size must match that specified with the constructor.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>of the element to be searched </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a44dfebdb7d2c909bf3e7e7f4ee65554e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the number of elements currently in this parfect hash table. </p>
<dl class="section return"><dt>Returns:</dt><dd>the number of elements currently in this parfect hash table </dd></dl>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="aea88561fddd2e924cebf793f0cfdc8b6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classHash_1_1Search.html">Search</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ab9622513f2e957b9db790c4032ccbfb4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classHash_1_1BinSearch.html">BinSearch</a>* <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::bins</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> object to search in an ordered table. </p>

</div>
</div>
<a class="anchor" id="ae90bc6965f9447ad87736c77d6f43410"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classHash_1_1CMPHSearch.html">CMPHSearch</a>* <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::cmphs</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> object to search in the cmph table. </p>

</div>
</div>
<a class="anchor" id="a041ae966f44c256333f68fef549a053b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::compar)(const void *, const void *)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>it is expected to have two arguments which point to a key object and to an array member's key, in that order, and should return an integer less than, equal to, or greater than zero if the key object is found, respectively, to be less than, to match, or be greater than the array member. </p>

</div>
</div>
<a class="anchor" id="a1f38ab7c36ba7e5c1a00c27185cdc381"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::hashtab</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>packed table </p>

</div>
</div>
<a class="anchor" id="a035d8296ce745c37829cb286e7c905c6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::key_len</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>in bytes </p>

</div>
</div>
<a class="anchor" id="afe49a7ea85fe8259dc751c451ebc0906"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::key_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>in the struct T </p>

</div>
</div>
<a class="anchor" id="a5225bd53a5a66ccd0255d4d1366be69e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::nelem</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>number of elements in the table </p>

</div>
</div>
<a class="anchor" id="a84b77b59bd8e66fc9502bfdacf4afa4e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::packed_size</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>size of the packed table </p>

</div>
</div>
<a class="anchor" id="aa72bab5659a7bfedf7a7e33074b89103"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classHash_1_1Search.html">Search</a>* <a class="el" href="classHash.html">Hash</a>&lt; T &gt;::s</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>current object <a class="el" href="classHash_1_1Search.html" title="An interface to the search object.">Search</a> object </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>datastruct/<a class="el" href="Hash_8h_source.html">Hash.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Nov 26 2012 17:06:46 for Data Structures for Sets and Graphs by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
